package zzzhc.image.ui;

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;

import zzzhc.image.recognize.Filter;

public class FilterUtil {

	private FilterUtil() {
	}

	public static boolean hasProperties(Filter filter) {
		Class<? extends Filter> cls = filter.getClass();
		Field[] fs = cls.getDeclaredFields();
		int count = 0;
		for (Field f : fs) {
			int m = f.getModifiers();
			if (((m & Modifier.STATIC) != 0) || ((m & Modifier.FINAL) != 0)) {
				continue;
			} else {
				count++;
			}
		}
		return count != 0;
	}

}
